package com.eastdigit.bpm.identity;

import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.interceptor.SessionFactory;

public class UserEntityManagerFactory implements SessionFactory {

    private UserEntityManager userEntityManager;

    public Class<?> getSessionType() {
        // 返回原始的UserManager类型
        return UserEntityManager.class;
    }

    public Session openSession() {
        // 返回自定义的UserManager实例
        return userEntityManager;
    }

    public void setUserEntityManager(UserEntityManager userEntityManager) {
        this.userEntityManager = userEntityManager;
    }
}
